#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "sha512.h"

int main()
{
    uchar digest[SHA512_DIGEST_SIZE] = {0};
    uchar buf[1024]                  = {0};
;
    sha512_ctx_t ctx;

    sha512_init(&ctx);
    sha512_update(&ctx, buf, sizeof(buf));
    sha512_final(&ctx, digest, SHA512_DIGEST_SIZE);

    for(int i = 0; i < SHA512_DIGEST_SIZE; ++i) {
        printf("%02x", digest[i]);
    }
    return 0;
}